<?php
$t=date("Y-m-d H:i:s")."\n";
echo $t;
$handle = fopen("time.txt", "a+");
$w=fwrite($handle, $t);
var_dump($w);
?>
<html>
	<head>
		<meta charset="UTF-8">
		<title>时间记录</title>
	</head>
<body>
<input type="text" id="clock" size="70" />
<script type="text/javascript">
	var int=self.setInterval("clock()",60000);
	var t=new Date();
	document.getElementById("clock").value=t;
	function clock(){
		window.location.href='time.php';
	}
</script>
<button onclick="int=window.clearInterval(int)">停止</button>
<button onclick="int=self.setInterval('clock()',60000)">重新启动</button>
</body>
</html>

















